package com.group3.admin.service.impl;

import java.util.List;

import com.group3.admin.dao.IAMerchantDao;
import com.group3.admin.dao.impl.AMerchantDaoImpl;
import com.group3.admin.service.IAMerchantService;
import com.group3.entity.AMerchant;

public class AMerchantServiceImpl implements IAMerchantService{
	private IAMerchantDao dao = new AMerchantDaoImpl();
	@Override
	public List<AMerchant> queryAMlistByType(String type) {
		List<AMerchant> aMerchantList = dao.queryByType(type);
		return aMerchantList;
	}

	@Override
	public AMerchant queryAMerchantByMId(String mid) {
		AMerchant aMerchant = dao.queryMerchantByMId(mid);
		return aMerchant;
	}

	@Override
	public AMerchant updateAMerchant(AMerchant aMerchant) {
		AMerchant aMerchant2 = dao.updateMerchant(aMerchant);
		return aMerchant2;
	}

	@Override
	public AMerchant addMerchant(AMerchant aMerchant) {
		AMerchant aMerchant3 = dao.insertMerchant(aMerchant);
		return aMerchant3;
	}

	@Override
	public List<AMerchant> listAllAMerchant() {
		List<AMerchant> list = dao.queryAllMerchant();
		return list;
	}

	public AMerchant updateStatusByType(AMerchant aMerchant) {
		AMerchant aMerchant4 = dao.updateStatusByType(aMerchant); 
		return aMerchant4;
	}

	public List<String> queryMidList() {
		return dao.midListQueryByType();
	}

	@Override
	public AMerchant updateResubmitAMerchant(AMerchant aMerchant) {
		
		return dao.updateResubmitAMerchant(aMerchant);
	}
	
}